use c++ style attribute syntax with gnu namespace. (#1069)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 16 Apr 2023 15:32:46 +0000 (09:32 -0600)
committerGitHub <noreply@github.com>
Sun, 16 Apr 2023 15:32:46 +0000 (09:32 -0600)
commitd2f16be3a27bd590d1b8d09e9249dca002c8ef77
tree724f5a63effd8996d210087f87e83a9ab699daf4
parent3f30f22d9d9c187e7ccb020cb538b18bdc971eae
use c++ style attribute syntax with gnu namespace. (#1069)

* use c++ style attribute syntax with gnu namespace.

cppcheck 2.10.3 seems to have difficulty combining c++ style
attributes like [[noreturn]] with gnu __attribute__ syntax.
this leads to lots of false positive [nullPointerRedundantCheck]
warings.

I have a feeling I did this before and it failed somewhere.  Perhaps
our compilers are all ready for it now.

* fix 7 real nullPointerRedundantCheck warnings.

and
7 nullPointerArithmeticRedundantCheck warnings
1 redundantInitialization warning
1 unreadVariable warning

* fix 1 nullPointerRedundantCheck.

A more involved fix would be to pass a reference to a non-const
parameter to mkshort_del_handle to be used as an in-out parameter.

* fix 1 nullPointerRedundantCheck

* workaround cppcheck bug with noretun.
defs.h
garmin_gpi.cc
mkshort.cc
util.cc